// 声明自定义校验的方法
function validateAccount(rules, value, callback) {
    if (value.length < 10) {
      callback();
    } else {
      callback(new Error("账号长度不超过10位"));
    }
  }

export default {
  data(){
    return {
      rules: {
        account: [
          {
            required: true,
            message: "请输入账号",
            trigger: "blur",
          },
          {
            validator: validateAccount,
            trigger: "change",
          },
        ],
        password: [
          {
            required: true,
            message: "请输入密码",
            trigger: "blur",
          }
        ],
      },
    }
  },
}